import Vue from 'vue'
import Router from 'vue-router'
const Cat=()=>import('../views/cat/Cat.vue')
const Cate=()=>import('../views/cate/cate.vue')
const Home=()=>import('../views/home/Home.vue')
const Profile=()=>import('../views/profile/Profile.vue')

//安装插件
Vue.use(Router)
//创建路由导出
export default new Router({
  mode:'history',
  routes: [
    {
      path: '',
      redirect: "/home"
    },
    {
      path: '/home',
      component: Home
    },
    {
      path: '/category',
     component: Cate
    },
    {
      path: '/cart',
      component: Cat
    },
    {
      path: '/profile',
      component: Profile
    }
  ]
})

